package com.bestsoft.baseinfo.service.impl;

import java.util.List;

import com.bestsoft.baseinfo.service.IBaseInfoClientService;
import com.bestsoft.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bestsoft.baseinfo.mapper.BaseInfoClientMapper;
import com.bestsoft.baseinfo.domain.BaseInfoClient;

/**
 * 客户资料Service业务层处理1
 * 
 * @author 王识宇
 * @date 2023-09-19
 */
@Service
public class BaseInfoClientServiceImpl implements IBaseInfoClientService
{
    @Autowired
    private BaseInfoClientMapper baseInfoClientDocMapper;

    /**
     * 查询客户资料
     * 
     * @param clientid 客户资料主键
     * @return 客户资料
     */
    @Override
    public BaseInfoClient selectBaseInfoClientDocByClientid(Long clientid)
    {
        return baseInfoClientDocMapper.selectBaseInfoClientDocByClientid(clientid);
    }

    /**
     * 查询客户资料列表
     * 
     * @param baseInfoClientDoc 客户资料
     * @return 客户资料
     */
    @Override
    public List<BaseInfoClient> selectBaseInfoClientDocList(BaseInfoClient baseInfoClientDoc)
    {
        return baseInfoClientDocMapper.selectBaseInfoClientDocList(baseInfoClientDoc);
    }

    /**
     * 新增客户资料
     * 
     * @param baseInfoClientDoc 客户资料
     * @return 结果
     */
    @Override
    public int insertBaseInfoClientDoc(BaseInfoClient baseInfoClientDoc)
    {
        baseInfoClientDoc.setCreateTime(DateUtils.getNowDate());
        return baseInfoClientDocMapper.insertBaseInfoClientDoc(baseInfoClientDoc);
    }

    /**
     * 修改客户资料
     * 
     * @param baseInfoClientDoc 客户资料
     * @return 结果
     */
    @Override
    public int updateBaseInfoClientDoc(BaseInfoClient baseInfoClientDoc)
    {
        baseInfoClientDoc.setUpdateTime(DateUtils.getNowDate());
        return baseInfoClientDocMapper.updateBaseInfoClientDoc(baseInfoClientDoc);
    }

    /**
     * 批量删除客户资料
     * 
     * @param clientids 需要删除的客户资料主键
     * @return 结果
     */
    @Override
    public int deleteBaseInfoClientDocByClientids(Long[] clientids)
    {
        return baseInfoClientDocMapper.deleteBaseInfoClientDocByClientids(clientids);
    }

    /**
     * 删除客户资料信息
     * 
     * @param clientid 客户资料主键
     * @return 结果
     */
    @Override
    public int deleteBaseInfoClientDocByClientid(Long clientid)
    {
        return baseInfoClientDocMapper.deleteBaseInfoClientDocByClientid(clientid);
    }
}
